package com.yan.demo;

import javax.xml.crypto.Data;
import java.util.Calendar;
import java.util.Date;

public class Demo1 {
    public static void main(String[] args) {
        Calendar calendar = Calendar.getInstance();
        int year = calendar.get(Calendar.YEAR);
        System.out.println(year);
        Date date = calendar.getTime();
        System.out.println("date = " + date);
        calendar.setTime(new Date(0L));
        System.out.println(calendar);
    }
}
